home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 February / CMCD0205.ISO / Software / Freeware / Programare / bluej / bluejsetup-203.exe / {app} / examples / shapes / README.TXT < prev    next >
Text File  |  2004-12-19  |  2KB  |  44 lines

  1. Project "shapes"
  2. Authors: Michael Kolling and David J. Barnes
  3.  
  4. This project is part of the material for the book
  5.  
  6.    Objects First with Java - A Practical Introduction using BlueJ
  7.    David J. Barnes and Michael Kolling
  8.    Pearson Education, 2002
  9.  
  10. It is discussed in chapter 1.
  11.  
  12. This is a very simple project to demonstrate some characteristics of
  13. objects.
  14.  
  15. You can create various shapes, and you will see, if you do, that those
  16. shapes are drawn on screen (in a window that we call the "canvas").
  17.  
  18. You can then manipulate these objects: change their position, size and 
  19. colour. Try it out: create a few different squares, triangles and circles.
  20.  
  21. This project is designed as a first example of object-oriented programming.
  22. It illustrates a number of concepts:
  23.  
  24.  - a Java project (application) is a collection of classes
  25.  - objects can be created from classes
  26.  - from any one class, many objects may be created
  27.  - objects have operations (methods)
  28.  - operations can have parameters
  29.  - parameters have types (at least String and int)
  30.  - objects hold data (fields)
  31.  - the operations and fields are common to all objects
  32.  - the values stored in the fields can be different for each object
  33.  
  34. The project also demonstrates
  35.  
  36.  - BlueJ object creation
  37.  - interactive method invocation
  38.  - parameter passing
  39.  
  40. A good second project to look at after this is "picture", which adds a class
  41. to those ones in this project. That class (named "Picture") uses the shapes
  42. to draw a picture. It can be used to experiment with coding.
  43.  
  44. Michael Kolling, July 2000